package com.ark.common.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class BaseException extends RuntimeException{

    private String message;
    private Integer code;
    private Object data;

    public BaseException(String message) {
        this.message = message;
    }

    public BaseException(Integer code,String message) {
        this.code = code;
        this.message = message;
    }

    public BaseException( Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
